//
//  CollectionViewHeaderView.m
//  UItableView联动UICollectionView
//
//  Created by 嚼华先森 on 2017/6/1.
//  Copyright © 2017年 嚼华. All rights reserved.
//

#import "CollectionViewHeaderView.h"

@implementation CollectionViewHeaderView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self == [super initWithFrame:frame]) {
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(2, 0, self.frame.size.width-70,  self.frame.size.height)];
        self.label.font = [UIFont systemFontOfSize:15.0];
        self.label.textAlignment = NSTextAlignmentLeft;
//        self.label.backgroundColor = [UIColor colorWithRed:217/255.0 green:217/255.0 blue:217/255.0 alpha:1];
        [self addSubview:self.label];
        
        
        //createButtonFrame:CGRectMake( self.frame.size.width-70 , 0, 0, self.frame.size.height ) backImageName:@"" title:@"sjosdi" titleColor:[UIColor lightGrayColor] font:[UIFont systemFontOfSize:14] target:self action:@selector(allBtnAction)
        self.rightBtn = [BasePublicCreatUI createBtnFrame:CGRectMake( self.frame.size.width-70 , 0, 50, self.frame.size.height) title:@"全部" bgImage:@"" selectBgImage:nil image:nil target:self action:@selector(allBtnAction)];
        self.rightBtn.titleLabel.font = [UIFont systemFontOfSize:12];
//        [self.rightBtn setBackgroundColor:[UIColor blackColor]];
        [self.rightBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        [self addSubview:self.rightBtn];
        
        self.rightImgView = [BasePublicCreatUI createImageViewFrame:CGRectMake(self.frame.size.width-20, self.frame.size.height/2-5, 8, 10) imageName:@"fenlei_youjiantou" color:[UIColor whiteColor]];
        [self addSubview:self.rightImgView];
        
        
        
    }
    return self;
}
-(void)allBtnAction{
    NSLog(@"allBtnAction");
}
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
@end
